Keir Starmer and Friedrich Merz have signed the first bilateral treaty between the countries since the Second World War.